import axios from 'axios';

export default {
    loginSys(body) {
        return axios({
            url: '/api/authorizeNew',
            method: 'post',
            data: body
        })
    },
    getUserInfo() {
        return axios({
            url: '/api/sUser/currentUserInfo',
            method: 'get'
        });
    },
    authorizePhone(data) {
        return axios.request({
            url: '/api/authorizePhone',
            method: 'POST',
            data
        });
    },
    getCustomerByUserName(userName) {
        return axios({
            url: '/api/s_customer_user/fetchCustomerByUserName/' + userName,
            method: 'get'
        });
    },
    cmlLogin(data) {
        return axios({
            url: '/api/sUser/cmlLogin',
            method: 'POST',
            data
        });
    },
  // 修改密码
  modifyMyPassword(data) {
    return axios({
      url: '/api/sUser/password/myAdmin',
      method: 'put',
      data
    });
  }
}
